package com.project.nimsen.common.web;

import java.io.Serializable;

import org.apache.shiro.SecurityUtils;

public class LoginUser implements Serializable {
	private static final long serialVersionUID = -2861420086405651522L;
	private String username;
	private String truename;
	private String unitid;
	private String roleid;
	private String role_name;
	
	public String getRole_name() {
		return role_name;
	}
	public void setRole_name(String role_name) {
		this.role_name = role_name;
	}
	private String userid;
	private LoginUser(){}
	public static LoginUser getCurr(){
		Object obj_login = SecurityUtils.getSubject().getPrincipal();
		if(obj_login==null)
			return new LoginUser();
		LoginUser loginUser = (LoginUser) obj_login;
		return loginUser;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getTruename() {
		return truename;
	}
	public void setTruename(String truename) {
		this.truename = truename;
	}
	public String getUnitid() {
		return unitid;
	}
	public void setUnitid(String unitid) {
		this.unitid = unitid;
	}
	public String getRoleid() {
		return roleid;
	}
	public void setRoleid(String roleid) {
		this.roleid = roleid;
	}
	public String getUserid() {
		return userid;
	}
	public void setUserid(String userid) {
		this.userid = userid;
	}
}
